//
//  BHStadiumSuitInfoCell.swift
//  BigHealth
//
//  Created by 蔺百好 on 2021/7/1.
//

import UIKit

class BHStadiumSuitInfoCell: UITableViewCell {

    @IBOutlet weak var iconImgView: UIImageView!
    
    @IBOutlet weak var name_label: UILabel!
    
    @IBOutlet weak var price_label: UILabel!
    @IBOutlet weak var buyBtn: UIButton!
    
    @IBOutlet weak var buyCount_label: UILabel!
    
    
    var model: BHGoodsInfoModel! {
        didSet {
            self.iconImgView.sd_setImage(with: URL.init(string: model.cover), completed: nil)
            self.name_label.text = "[\(model.typeName)]\(model.name)"
            self.price_label.text = "¥\(model.price)"
            self.buyCount_label.text = "已购买\(model.purchaseNumber)次"
        }
    }
    
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        self.iconImgView.addLayerCorner(4, 0, .white)
        self.buyBtn.addLayerCorner(11, 0, .white)
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
    
    static var cellHeight: CGFloat {
        get {
            return 70
        }
    }
    
}
